﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Bug">
    <DESCRIPTION>Describes a divergence between required and actual behavior, and tracks the work done to correct the defect and verify the correction.</DESCRIPTION>
    <FIELDS>
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <REQUIRED />
      </FIELD>
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension" />
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension" />
      <FIELD name="History" refname="System.History" type="History" />
      <FIELD name="State" refname="System.State" type="String" reportable="dimension" />
      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension" />
      <FIELD name="System Info" refname="Microsoft.VSTS.TCM.SystemInfo" type="HTML" />
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
      </FIELD>
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Repro Steps" refname="Microsoft.VSTS.TCM.ReproSteps" type="HTML" />
      <FIELD name="Backlog Priority" refname="Microsoft.VSTS.Common.BacklogPriority" type="Double" reportable="detail" />
      <FIELD name="Effort" refname="Microsoft.VSTS.Scheduling.Effort" type="Double" reportable="measure" formula="sum" />
      <FIELD name="Acceptance Criteria" refname="Microsoft.VSTS.Common.AcceptanceCriteria" type="HTML" />
      <FIELD name="Severity" refname="Microsoft.VSTS.Common.Severity" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="1 - Critical" />
          <LISTITEM value="2 - High" />
          <LISTITEM value="3 - Medium" />
          <LISTITEM value="4 - Low" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="3 - Medium" />
      </FIELD>
      <!-- **************** Team Build Integration Fields **************  -->
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
        <SUGGESTEDVALUES>
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
      </FIELD>
      <FIELD name="Found In" refname="Microsoft.VSTS.Build.FoundIn" type="String" reportable="dimension">
        <SUGGESTEDVALUES>
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
      </FIELD>
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="New">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Approved">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Committed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Done">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Scheduling.Effort">
              <READONLY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Removed" />
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="New">
          <REASONS>
            <DEFAULTREASON value="New defect reported" />
			      <REASON value="Build Failure" />
          </REASONS>         
        </TRANSITION>
        <TRANSITION from="New" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Approved by the Product Owner" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="New" to="Committed">
          <REASONS>
            <DEFAULTREASON value="Commitment made by the team" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="New" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Approved" to="Committed">
          <REASONS>
            <DEFAULTREASON value="Commitment made by the team" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Committed" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Committed" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Work stopped" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="New" to="Removed">
          <REASONS>
            <REASON value="Not a Bug" />
            <REASON value="Duplicate" />
            <DEFAULTREASON value="Removed from the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Approved" to="Removed">
          <REASONS>
            <REASON value="Not a Bug" />
            <REASON value="Duplicate" />
            <DEFAULTREASON value="Removed from the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Done" to="Committed">
          <REASONS>
            <DEFAULTREASON value="Additional work found" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Removed" to="New">
          <REASONS>
            <DEFAULTREASON value="Reconsidering backlog item" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Approved" to="New">
          <REASONS>
            <DEFAULTREASON value="Moved to the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Committed" to="New">
          <REASONS>
            <DEFAULTREASON value="Moved to the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Done" to="New">
          <REASONS>
            <DEFAULTREASON value="Moved to the backlog" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Done" to="Approved">
          <REASONS>
            <DEFAULTREASON value="Additional work found" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Approved" to="Done">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout HideReadOnlyEmptyFields="true" HideControlBorders="true">
        <Group Margin="(4,0,0,0)">
          <Column PercentWidth="100">
            <Control FieldName="System.Title" Type="FieldControl" ControlFontSize="large" EmptyText="&lt;Enter title here&gt;" />
          </Column>
        </Group>
        <Group Margin="(10,0,0,0)">
          <Column PercentWidth="100">
            <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Ite&amp;ration" LabelPosition="Left" />
          </Column>
        </Group>
        <Group Margin="(10,0,0,0)">
          <Column PercentWidth="50">
            <Group Label="Status">
              <Column PercentWidth="100">
                <Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assi&amp;gned To" LabelPosition="Left" />
                <Control FieldName="System.State" Type="FieldControl" Label="Stat&amp;e" LabelPosition="Left" />
                <Control FieldName="System.Reason" Type="FieldControl" Label="Reason" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
          <Column PercentWidth="50">
            <Group Label="Details">
              <Column PercentWidth="100">                
                <Control FieldName="Microsoft.VSTS.Scheduling.Effort" Type="FieldControl" Label="Effort" LabelPosition="Left" />
                <Control FieldName="Microsoft.VSTS.Common.Severity" Type="FieldControl" Label="Severity" LabelPosition="Left" />
                <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area" LabelPosition="Left" />
                <Control FieldName="Microsoft.VSTS.Common.BacklogPriority" Type="FieldControl" Label="Backlog Priority" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <TabGroup>
              <Tab Label="Steps to Reproduce">
                <Control FieldName="Microsoft.VSTS.TCM.ReproSteps" Type="HtmlFieldControl" Label="" LabelPosition="Top" MinimumSize="(100,200)" Dock="Fill" />
              </Tab>
              <Tab Label="System">
                <Group Label="Build">
                  <Column PercentWidth="100">
                    <Control FieldName="Microsoft.VSTS.Build.FoundIn" Type="FieldControl" Label="Found In Build" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Build.IntegrationBuild" Type="FieldControl" Label="Integrated in Build" LabelPosition="Left" />
                  </Column>
                </Group>
                <Control FieldName="Microsoft.VSTS.TCM.SystemInfo" Type="HtmlFieldControl" Label="System Info" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="Test Cases">
                <Control Type="LinksControl" Name="TestedBy" Label="" LabelPosition="Top">
                  <LinksControlOptions>
                    <LinkColumns>
                      <LinkColumn RefName="System.Id" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                    </LinkColumns>
                    <WorkItemLinkFilters FilterType="include">
                      <Filter LinkType="Microsoft.VSTS.Common.TestedBy" FilterOn="forwardname" />
                    </WorkItemLinkFilters>
                    <ExternalLinkFilters FilterType="excludeAll" />
                    <WorkItemTypeFilters FilterType="include">
                      <Filter WorkItemType="Test Case" />
                    </WorkItemTypeFilters>
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="Tasks">
                <Control Type="LinksControl" Label="" LabelPosition="Top" Name="TaskLinks">
                  <LinksControlOptions>
                    <LinkColumns>
                      <LinkColumn RefName="System.Id" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                    </LinkColumns>
                    <WorkItemLinkFilters FilterType="include">
                      <Filter LinkType="System.LinkTypes.Hierarchy" FilterOn="forwardname" />
                    </WorkItemLinkFilters>
                    <ExternalLinkFilters FilterType="excludeAll" />
                    <WorkItemTypeFilters FilterType="include">
                      <Filter WorkItemType="Task" />
                    </WorkItemTypeFilters>
                  </LinksControlOptions>
                </Control>
              </Tab>
            </TabGroup>
          </Column>
          <Column PercentWidth="50">
            <TabGroup Margin="(5,0,0,0)">
              <Tab Label="Acceptance Criteria">
                <Control FieldName="Microsoft.VSTS.Common.AcceptanceCriteria" Type="HtmlFieldControl" Label="" LabelPosition="Top" Dock="Fill" MinimumSize="(100,200)" />
              </Tab>
              <Tab Label="History">
                <Control FieldName="System.History" Type="WorkItemLogControl" Label="" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="Links">
                <Control Type="LinksControl" Name="GeneralLinks" LabelPosition="Top">
                  <LinksControlOptions>
                    <LinkColumns>
                      <LinkColumn RefName="System.Id" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                    <WorkItemLinkFilters FilterType="includeAll" />
                    <ExternalLinkFilters FilterType="includeAll" />
                    <WorkItemTypeFilters FilterType="includeAll" />
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="Attachments">
                <Control Type="AttachmentsControl" LabelPosition="Top" />
              </Tab>
            </TabGroup>
          </Column>
        </Group>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>